<?php

use yii\helpers\Html;
use yii\grid\GridView;
use kartik\dynagrid\DynaGrid;

/* @var $this yii\web\View */
/* @var $searchModel common\models\GoodsCategorySearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '分类';
$this->params['breadcrumbs'][] = $this->title;
?>
<?php $this->beginBlock('content-header') ?>
<?= $this->title ?>
<?php $this->endBlock() ?>
    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>

    <div class="box box-primary">
        <div class="box-body">
            <?= DynaGrid::widget([
        'columns' => [
                    'id',
                    'category_name',
                    'created_at:datetime',
            ['class' => 'kartik\grid\ActionColumn','dropdown'=>true,'dropdownButton'=>['label'=>'工具箱','class'=>'btn btn-default'],  'dropdownOptions' => ['class' => 'float-right'],'headerOptions' => ['class' => 'kartik-sheet-style']],
                ],
                'storage'=>DynaGrid::TYPE_COOKIE,
                'theme'=>'panel-danger',
                'gridOptions'=>[
                    'dataProvider'=>$dataProvider,
                    'filterModel'=>$searchModel,
                    'panel'=>[
                        'heading'=>false,
                        'type'=>'success',
                        'before'=>Html::a('<i class="glyphicon glyphicon-plus"></i>新建分类', ['create'], ['class' => 'btn btn-success']),
                    ],
                ],
                'options'=>['id'=>'dynagrid-1'] // a unique identifier is important
            ]); ?>
        </div>
    </div>
    
    